package com.lemon.message.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lemon.common.core.annotation.Excel;
import com.lemon.common.core.serializer.JsonLongDeserializer;
import com.lemon.common.core.serializer.JsonLongSerializer;
import com.lemon.common.core.base.BaseEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 包名称：com.lemon.message.domain
 * 类名称：BiEmailTemplate
 * 类描述：邮件模板对象 bi_email_template
 * 创建人：@author lemon
 * 创建时间：2023-11-18
 */
public class BiEmailTemplate extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long id;

    /** 模板编码 */
    @Excel(name = "模板编码")
    private String templateCode;

    /** 模板名称 */
    @Excel(name = "模板名称")
    private String templateName;

    /** 发件人 */
    @Excel(name = "发件人")
    private String fromEmail;

    /** 邮件主题 */
    @Excel(name = "邮件主题")
    private String subject;

    /** 邮件内容 */
    private String content;

    /** 收件人邮箱，多个;隔开 */
    @Excel(name = "收件人邮箱，多个;隔开")
    private String toEmail;

    /** 抄送人邮箱，多个;隔开 */
    @Excel(name = "抄送人邮箱，多个;隔开")
    private String ccEmail;

    /** 密送人邮箱，多个;隔开 */
    @Excel(name = "密送人邮箱，多个;隔开")
    private String bccEmail;

    /** 附件地址，多个;隔开 */
    private String attachUrl;

    /**
     * 邮件url附件
     */
    private List<String> attachUrlList;

    /**
     * 邮件附件,本地文件上传
     */
    private List<MultipartFile> attachFileList;

    /**
     * 邮件内联附件,本地文件上传
     */
    private List<MultipartFile> inlineFileList;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }
    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }

    public String getTemplateCode() {
        return templateCode;
    }
    public void setTemplateName(String templateName) {
        this.templateName = templateName;
    }

    public String getTemplateName() {
        return templateName;
    }
    public void setFromEmail(String fromEmail) {
        this.fromEmail = fromEmail;
    }

    public String getFromEmail() {
        return fromEmail;
    }
    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getSubject() {
        return subject;
    }
    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }
    public void setToEmail(String toEmail) {
        this.toEmail = toEmail;
    }

    public String getToEmail() {
        return toEmail;
    }
    public void setCcEmail(String ccEmail) {
        this.ccEmail = ccEmail;
    }

    public String getCcEmail() {
        return ccEmail;
    }
    public void setBccEmail(String bccEmail) {
        this.bccEmail = bccEmail;
    }

    public String getBccEmail() {
        return bccEmail;
    }
    public void setAttachUrl(String attachUrl) {
        this.attachUrl = attachUrl;
    }

    public String getAttachUrl() {
        return attachUrl;
    }

    public List<String> getAttachUrlList() {
        return attachUrlList;
    }

    public void setAttachUrlList(List<String> attachUrlList) {
        this.attachUrlList = attachUrlList;
    }

    public List<MultipartFile> getAttachFileList() {
        return attachFileList;
    }

    public void setAttachFileList(List<MultipartFile> attachFileList) {
        this.attachFileList = attachFileList;
    }

    public List<MultipartFile> getInlineFileList() {
        return inlineFileList;
    }

    public void setInlineFileList(List<MultipartFile> inlineFileList) {
        this.inlineFileList = inlineFileList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("templateCode", getTemplateCode())
                .append("templateName", getTemplateName())
                .append("fromEmail", getFromEmail())
                .append("subject", getSubject())
                .append("content", getContent())
                .append("toEmail", getToEmail())
                .append("ccEmail", getCcEmail())
                .append("bccEmail", getBccEmail())
                .append("attachUrl", getAttachUrl())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .append("remark", getRemark())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
